package com.xmtlxx.system.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * 行政区划管理视图对象 sys_area
 *
 * @author xmtlxx
 * @date 2022-04-28
 */
@Data
@ApiModel("行政区划管理视图对象")
@ExcelIgnoreUnannotated
public class SysAreaVo {

    private static final long serialVersionUID = 1L;

    /**
     * 唯一标识符，区域编码
     */
    @ExcelProperty(value = "唯一标识符，区域编码")
    @ApiModelProperty("唯一标识符，区域编码")
    private Long areaId;

    /**
     * 区域名称
     */
    @ExcelProperty(value = "区域名称")
    @ApiModelProperty("区域名称")
    private String areaName;

    /**
     * 父级id
     */
    @ExcelProperty(value = "父级id")
    @ApiModelProperty("父级id")
    private Long pid;

    /**
     * 区域简称
     */
    @ExcelProperty(value = "区域简称")
    @ApiModelProperty("区域简称")
    private String sname;

    /**
     * 父级ID
     */
    @ExcelProperty(value = "父级ID")
    @ApiModelProperty("父级ID")
    private Long parentId;

    /**
     * 祖级列表
     */
    @ExcelProperty(value = "祖级列表")
    @ApiModelProperty("祖级列表")
    private String ancestors;

    /**
     * 等级
     */
    @ExcelProperty(value = "等级")
    @ApiModelProperty("等级")
    private Long levels;

    private Boolean hasChildren;

    public Boolean getHasChildren() {
        if(this.levels != 4){
            return true;
        }
        return false;
    }

    public void setHasChildren(Boolean hasChildren) {
        this.hasChildren = hasChildren;
    }
}
